<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
		<title>html5新增的布局元素</title>
		{% load static %}
    	<link rel="stylesheet" type="text/css" href="{% static 'css/7css.css' %}"/>
</head>
	<body bgcolor="mediumblue"  background="{% static 'image/t01d61356d326bd0f99.jpg' %}">
		<!----头部-->
		<form  method="POST" id="text" name="text"  action="/login/fb1/" >
		{% include "htm.html" %}
		<!--区域-->
		<div id="contatiner" style="height: 580px;border: 1px solid gray; margin-top: 5px" >
		<section>
			{% csrf_token %}
			<h2>>发布新文章 <a style="float:right;" href="/login/an?page=1">[返回]</a></h2>
			<article>
				文章标题：
				<input type="text" name="title" id="title"  required/><br>
			</article>
			<article>
				文章类型：
				<select name="genre" id="genre" required>

					<option value="1">技术类</option>
					<option value="2">生活类</option>
					<option value="3">其它</option>
				</select>
			</article>
			<article>
				发布昵称：
				<input type="text" name="dept" id="dept" value="{{man.name}}" readonly />
			</article>
		<div name="" id="editor">
                <!-- <input type="hidden" id="hidden_editor" value=""> -->
                <p></p>
                
            </div>
            <input type="hidden" id="artile" name="artile" value="" />
        </form>           
            <input type="submit" form="text" id="btn1" value="发布"/> <!--按钮-->                     
            <script type="text/javascript" src="{% static "wangEditor-3.1.1/wangEditor-3.1.1/release/wangEditor.min.js" %}"></script>
            <script type="text/javascript">
                var E = window.wangEditor
                var editor = new E('#editor')
                // 或者 var editor = new E( document.getElementById('editor') )
                editor.create()
                document.getElementById('btn1').addEventListener('click', function () {
                    // 读取 html
                    document.getElementById("artile").value=editor.txt.html();
                    // window.location="/appone/article/"+content1;
                }, false)

            </script>    	
	</div>
	{% include "yewb.html" %}
</body>
</html>
